Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Jan 20, 2025

Fixes TOOL-3146


PR-Codex overview

This PR primarily focuses on enhancing the thirdweb library by improving error handling, updating dependencies, and refining wallet connection logic.

Detailed summary

  • Added fallback to eip1193 provider chain when switching chains is unsupported.
  • Improved error handling for chain ID retrieval in packages/thirdweb/src/wallets/injected/index.ts.
  • Updated retry configuration in packages/thirdweb/test/vitest.config.ts.
  • Introduced new dependencies @abstract-foundation/agw-client and @abstract-foundation/agw-react in apps/playground-web/package.json.
  • Enhanced wallet creation logic to support specific wallet IDs in apps/playground-web/src/app/connect/sign-in/button/RightSection.tsx.
  • Updated wallet connection handling in packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx.

The following files were skipped due to too many changes: pnpm-lock.yaml

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Jan 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 10:43pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 10:43pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 10:43pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 10:43pm

@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2025

🦋 Changeset detected

Latest commit: 43dfb68

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added Playground Changes involving the Playground codebase. packages SDK Involves changes to the thirdweb SDK labels Jan 20, 2025
@joaquim-verges joaquim-verges marked this pull request as ready for review January 20, 2025 22:22
@joaquim-verges joaquim-verges requested review from a team as code owners January 20, 2025 22:22
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@linear
Copy link

linear bot commented Jan 20, 2025

@joaquim-verges joaquim-verges force-pushed the 01-21-fix_fallback_to_eip1193_provider_chain_when_switching_chains_is_not_supported branch from 892ff4f to 43dfb68 Compare January 20, 2025 22:34
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@abstract-foundation/[email protected] None 0 1.42 MB coffeexcoin
npm/@abstract-foundation/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +506 147 MB coffeexcoin

View full report↗︎

@socket-security
Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Protestware or potentially unwanted behavior npm/[email protected]
  • Note: The script attempts to run a local post-install script, which could potentially contain malicious code. The error handling suggests that it is designed to fail silently, which is a common tactic in malicious scripts.
⚠︎
Protestware or potentially unwanted behavior npm/[email protected]
  • Note: This package prints a protestware console message on install regarding Ukraine for users with Russian language locale
⚠︎

View full report↗︎

Next steps

What is protestware?

This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function.

Consider that consuming this package may come along with functionality unrelated to its primary purpose.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.68 KB (+0.05% 🔺) 934 ms (+0.05% 🔺) 2.5 s (-38.55% 🔽) 3.4 s
thirdweb (cjs) 116.87 KB (+0.03% 🔺) 2.4 s (+0.03% 🔺) 8.3 s (+3.17% 🔺) 10.6 s
thirdweb (minimal + tree-shaking) 5.59 KB (0%) 112 ms (0%) 592 ms (-8.9% 🔽) 704 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 66 ms (-16.85% 🔽) 76 ms
thirdweb/react (minimal + tree-shaking) 19.19 KB (-0.25% 🔽) 384 ms (-0.25% 🔽) 1.3 s (+36.78% 🔺) 1.7 s

@codecov
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 53.33333% with 7 lines in your changes missing coverage. Please review.

Project coverage is 54.88%. Comparing base (8b5cb47) to head (43dfb68).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/wallets/injected/index.ts 61.53% 5 Missing ⚠️
...eb/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6004      +/-   ##
==========================================
+ Coverage   54.79%   54.88%   +0.09%     
==========================================
  Files        1151     1151              
  Lines       61257    61165      -92     
  Branches     5152     5152              
==========================================
+ Hits        33565    33573       +8     
+ Misses      26964    26864     -100     
  Partials      728      728              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 8b5cb47
packages 52.55% <53.33%> (+0.11%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...eb/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx 1.75% <0.00%> (+0.82%) ⬆️
packages/thirdweb/src/wallets/injected/index.ts 36.66% <61.53%> (-0.12%) ⬇️

... and 2 files with indirect coverage changes

@joaquim-verges joaquim-verges merged commit bb6c71e into main Jan 21, 2025
31 of 32 checks passed
@joaquim-verges joaquim-verges deleted the 01-21-fix_fallback_to_eip1193_provider_chain_when_switching_chains_is_not_supported branch January 21, 2025 00:59
@joaquim-verges joaquim-verges mentioned this pull request Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages Playground Changes involving the Playground codebase. SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants